package com.lykj.llw.box.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.lykj.llw.box.R
import com.lykj.llw.box.data.bean.response.PtbRecordListResponse

/**
 * ================================================
 * 平台币充值记录
 * ================================================
 *
 * @author gosha
 * @date 2023/10/19-10:05
 */
class PTBRecordAdapter :
    BaseQuickAdapter<PtbRecordListResponse.DataDTO.RowsDTO, BaseViewHolder>(R.layout.item_ptb_recharge_record) {
    override fun convert(holder: BaseViewHolder, item: PtbRecordListResponse.DataDTO.RowsDTO) {
        holder.setText(R.id.tv_title, "购买${item.ptb}币")

        holder.setText(R.id.tv_time, "${item.updateTime}")

        if (item.type == 1) {
            holder.setText(R.id.tv_amount, "+${item.ptb}")
        } else {
            holder.setText(R.id.tv_amount, "-${item.ptb}")
        }
    }
}